﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {    //结构体
        struct BOOK
        {
            public double price;
            public int page;
        }
        //枚举
        enum fonttype
        {
            normal=10,
            bold,
            tatic

        }
        static void Main(string[] args)
        {
            Console.WriteLine("值类型转化演示");
            //整型
            int a = 10;
            long b = 10L;
            short c = 10;
            Console.WriteLine(a.GetType());
            Console.WriteLine(b.GetType());
            Console.WriteLine(c.GetType());
            //浮点型
            double d = 10.0;
            decimal f = 1.0M;
            float e = 1.0F;
            Console.WriteLine(d.GetType());
            Console.WriteLine(e.GetType());
            Console.WriteLine(f.GetType());
            //布尔
            bool g = true;
            Console.WriteLine(g.GetType());
            //字符
            char h = '涛';
            Console.WriteLine(h.GetType());
            //结构体
            BOOK book = new BOOK() { price = 20.0, page = 40 };
            Console.WriteLine("价格{0},页数{1}",book.price,book.page);
          
            //枚举
            fonttype ft = fonttype.bold;
            Console.WriteLine(ft);
            ft++;
            ft++;
            Console.WriteLine(ft);
            //等待输入
            Console.ReadKey();



        }
    }
}
